package com.molin.API.MathTest;


public class demo1 {

//    public static int abs(int a) 返回参数绝对值
//    public static double ceil(double a) 向上取整
//    public static double floor(double a) 向下取整
//    public static int round(double a) 四舍五入
//    public static int max(int a,int b) 最大值
//    public static int min(int a,int b) 最小值
//    public static double pow(double a,double b) 返回a的b次幂的值
//    public static double random() 返回为double的正值


    public static void main(String[] args) {
        System.out.println(Math.abs(-20));
        System.out.println(Math.ceil(10.1));
        System.out.println(Math.floor(10.9));
        System.out.println(Math.round(10.1));
        System.out.println(Math.round(10.5 ));
        System.out.println(Math.max(10,20));
        System.out.println(Math.min(10,20));
        System.out.println(Math.pow(10,2.1));
        System.out.println(Math.random()*10);
    }
}
